This invention relates to a measurement method performed by a numerical control device and, more particularly, to a measurement method through which, e.g., the amount of travel of an object can be measured by finding the total number of measurement pulses generated by a sensor.
A numerical control device generates distributed pulses (command pulses) by performing a pulse distribution operation based on the magnitude of a move command input from an NC tape or the like, and drives a motor on the basis of these pulses. The motor is controlled in such a manner that the difference between the number of distributed pulses and a number of feedback pulses, each of which is generated whenever a movable element such as the motor or a table rotates or travels by a predetermined amount, approaches zero, whereby positioning control or continuous cutting control is performed.
FIG. 1 is a block diagram of such a numerical control system. In FIG. 1, numeral 101 denotes a paper tape in which NC command data is punched. Numeral 102 denotes a control unit which causes a tape reader (not shown) to read in the NC data from the paper tape 101, and which decodes the read NC data, delivering, e.g., M, S and T function commands to the machine side through a heavy current switchboard and a move command X.sub.c to a pulse distributor, which is in a succeeding stage. Numeral 103 denotes the pulse distributor (PD), which executes well-known pulse distribution computations on the basis of the move command X.sub.c, and generates distributed pulses P.sub.s at a frequency corresponding to a commanded speed. Numeral 104 designates a known accelerator/decelerator circuit (ACC/DEC) which generates a train of pulses P.sub.i by rectilinearly accelerating the pulse rate of the train of distributed pulses P.sub.s at the beginning of a pulse train and by rectilinearly decelerating the same at the end thereof. Numeral 105 indicates a D.C. motor (M) by which a table TB or tool is driven. Numeral 106 denotes a pulse coder (PC) which generates one feedback pulse FP each time the DC motor 105 rotates by a predetermined amount. Numeral 107 denotes an error calculating and storing unit (ERR) which is constructed of, for example, a reversible counter, and which stores the difference E.sub.r between the number of the input pulses P.sub.i received from the accelerator/decelerator circuit 104 and that of the feedback pulses FP. This error calculating and storing unit may be constructed, as shown in the Figure, of an arithmetic circuit 107a for calculating the difference E.sub.r between the numbers of the pulses P.sub.i and FP, and an error register (REG) 107b for storing the error E.sub.r. More specifically, assuming that the DC motor 105 is rotating in the + direction, the error calculating and storing unit 107 operates in such a manner that each time the input pulse P.sub.i is generated, the content is counted up, while each time the feedback pulse FP is generated, the content is counted down, and that the difference E.sub.r between the number of input pulses and the feedback pulses is stored in the error register 107b. Numeral 108 denotes a digital-to-analog (DA) converter for generating an analog voltage proportional to the content of the error register 107b, and numeral 109 a speed control circuit (SC).
When the control unit 102 produces the move comman X.sub.c, the pulse distributor 103 executes the pulse distribution computation and provides the distributed pulses P.sub.s. Upon receiving the pulses P.sub.s, the accelerator/decelerator circuit 104 accelerates and decelerates the pulse rate thereof and applies the train of command pulses P.sub.i to the error calculating and storing circuit 107. Thus, the content of the error register 107b becomes non-zero, so that the DA converter 108 provides a voltage and the motor 105 is driven by the speed control circuit 109 so as to move the table TB. When the motor 105 has rotated by a predetermined amount, the feedback pulse FP is generated by the pulse coder 106 and is applied to the error calculating and storing unit 107. The difference Er between the number of commanded pulses Pi and the number of feedback pulses FP is stored in the error register 107b. Thenceforth, the table TB is servo-controlled so as to make the difference Er approach zero, whereby the table TB is moved toward a target position or along a commanded path and then brought to a stop.
There are instances where a user may wish to employ the above-described numerical control device as a measuring device. For example, a user may wish to measure the travelling distance of an object, length, bore depth, or the number of pulses generated by a sensing element. Heretofore, however, numerical control devices have not been applied to the measurement of physical quantities.
Accordingly, an object of the present invention is to provide a novel measurement method through which a numerical control device having the construction shown in FIG. 1 can be utilized as a measuring device.